The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.
Typical video compression schemes of the standards MPEG-1, MPEG-2, MPEG-4 Visual, H.261, H.263 and H.264/MPEG-4 AVC (Advanced Video Coding) compress video data by dividing each frame into a multitude of macroblock units, by which a predicted block is obtained through a prediction process, and then transforming and quantizing the difference between the original video block and the predicted block.
An intra prediction and inter prediction are two available prediction methods. The intra prediction performs the current block prediction by utilizing data of blocks that are present surrounding the current frame. The inter prediction generates a predicted block corresponding to the current block from previously encoded one or more video frames by utilizing a block-based motion compensation.
Particularly, in the inter prediction event, H.264/MPEG-4 AVC performs the motion prediction not by using a set dimension of block but with seven different block modes of 4×4 to 16×16 varieties.
FIG. 1a illustrates blocks of various sizes used in the conventional variable block-size motion prediction of H.264/MPEG-4 AVC.
As shown, the respective macroblock luminance components (a 16×16 sample) may be divided in four ways. In other words, each macroblock may be a single 16×16 macroblock, two 16×8 partitions thereof, two 8×16 partitions, or four 8×8 partitions to be motion predicted.
In addition, if an 8×8 mode were selected, four 8×8 sub-macroblocks of a macroblock may be subdivided into four ways, respectively. Specifically, with the selection of the 8×8 mode each 8×8 block may take one of four shapes comprising a single 8×8 sub-macroblock partition, two divided 8×4 sub-macroblock partitions, two divided 4×8 sub-macroblock partitions, and four divided 4×4 sub-macroblock partitions.
Within the respective macroblocks, these partitions and the sub-macroblocks may be related in numerous combinations. This method of dividing macroblocks into different sizes of sub-blocks is called tree structured motion compensation.
To decide the best encoding mode for a macroblock, according to the H.264 standard, the rate-distortion optimization is used. Typical rate-distortion optimization equation is as follows:Jmode=D+λmode·R  Equation 1where Jmode is a rate-distortion cost, λmode is Lagrangian multiplier, D is a value of distortion between an original macroblock and a reconstructed macroblock, and R is a coefficient to reflect the number of bits related to mode selection and the quantization value of the macroblock among others. Using Equation 1, the respective macroblocks are preliminarily encoded at the level of the different size-variable block divisions before deciding the mode with the lowest rate-distortion cost as the optimum mode.
In other words, the encoder carries out encoding in all the predicted encoding modes and then calculates rate-distortion costs to decide the prediction mode with the lowest rate-distortion cost as the prediction mode for use in the actual encoding process.
Although this technique of the rate-distortion optimization may dramatically improve the compression performance of the H.264/AVC encoder value as the optimum mode, the resulting increased complexity is a critical obstacle to the real-time encoding.
FIG. 1b illustrates the calculating complexity by performing the rate-distortion optimization. As illustrated in FIG. 1b, to perform the rate-distortion optimization increases the calculation complexity to at least seven to eight times greater than otherwise.
So, there is a practical need to provide a technology for the encoder to compress videos to minimize the compression speed and dramatically lower the calculation complexity while maintaining the compression performance using the rate-distortion optimization.